/**
 * 主要测试主线程死亡，子线程是否死亡。
 */
public class ThreadAndSubThread {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i = 0; i < 10; i++){
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    System.out.println("subThread" + i);
                }
            }
        }).start();

        System.out.println("mainThread end.");
    }
}
